<template>
	<view class="box1">
		<!-- <view class="f17 white">
			<view class=""><Title :txt="'提币记录'" :showback="true"></Title></view>
		</view> -->
		<view class="register mb24">
			<view class=""><Title :txt="i18n.tbjl" :showback="true"></Title></view>
		</view>
		<null v-if="list.length<=0"></null>
		<view class="record mgt10 pt15 pb15 f13" v-for="(item,index) in list" :key="item.id">
			<view class="type fcs  mgb8">
				<view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'">
					{{i18n.jylx}}
				</view>
				<view class="white mb3">
					{{i18n.tibi}}
				</view>
			</view>
			<view class="type fcs mgb8">
				 <view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'"> 
				 {{i18n.jyje}}
				 </view>
				 <view class="white mb3">
				 	{{item.money}}
				 </view>
			</view>
			<view class="type mgb8 fcs">
				<view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'">
					{{i18n.dzqb}}
				</view>
				<view class="copy white mb3">
					{{item.toAddress}}
				</view>
				<image src="../../static/copy.png" mode="" style="width: 24rpx; height: 24rpx;" @click="copyaddress(item.toAddress)"></image>
			</view>
			<view class="type fcs mgb8">
				 <view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'"> 
				 	{{i18n.jysjime}}
				 </view>
				 <view class="white mb3">
				 	{{item.createDate}}
				 </view>
			</view>
			<view class="type fcs mgb8">
				 <view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'">
				 	{{i18n.tbzt}}
				 </view>
				 <view class="white mb3"  v-if="item.status==0">
				 	{{i18n.dsh}}
				 </view>
				 <view class="white mb3" v-if="item.status==1">
				 	{{i18n.tbcg}}
				 </view>
				 <view class="white mb3" v-if="item.status==2">
				 	{{i18n.ybh}}
				 </view>
				 <view class="white mb3" v-if="item.status==3">
				 	{{i18n.tbz}}
				 </view>
				 <view class="white textcolorfail mb3" v-if="item.status==4">
				 	{{i18n.shsb}}
				 </view>
			</view>			
			<view class="type mgb8 fcs">
				<view class="textcolor mb3" :class="type=='en_US'?'width68':'Width140'">
						{{i18n.hxz}}
				</view>
				<view class="copy white mb3">
					{{item.txHash}}
				</view>
				<image src="../../static/copy.png" mode="" style="width: 24rpx; height: 24rpx;"  @click="copy(item.txHash)"></image>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			type:'0',
			list: [],
			status: 0,
			z:21,
			coin:""
		};
	},
	onLoad(options) {
		this.type = uni.getStorageSync('language')
		console.log(this.type)
		this.coin=options.coin
	},
	computed:{
		i18n() {
			return this.$t('ecology');
		}
	},
	onShow() {
		let params={
			coin:this.coin,
			page:1,
			size:10
		}
		this.$http.post('wallet.getWithdrawList',params,).then(res=>{
			// console.log(res)
			this.list=res.data.records
			
		})
	},
	methods:{
		async copyhash(data){
			await uni.setClipboardData({ data: data })
			uni.showToast({
				title: '复制成功',
				icon:'none'
			})
		},
		 async copyaddress(data){
			await uni.setClipboardData({ data: data })
			uni.showToast({
				title: '复制成功',
				icon:'none'
			})
		}
	}
};
</script>

<style lang="less">
page {
	background-color: #000;
}
body,
html {
	background-color: #000;
}
.textcolor{
	color:#586471;
}
.textcolorfail{
	color:#FF9439;
}
.width68{
	width:280rpx !important;
}
.Width140{
	width:140rpx !important;
}
.register {
	.back {
		justify-content: center;
		align-items: center;
		display: flex;
		font-size: 34rpx;
		margin-left: 30rpx;
		position: relative;
		.leftarrow {
			position: absolute;
			left: 0;
			top: 0;
			width: 32rpx;
			height: 32rpx;
		}
	}
	.chrecord {
		position: absolute;
		top: 0;
		right: 0;
		margin-right: 30rpx;
		color:#586471;
	}
}
.box1 {
	// background-color: #fff;
	.titlebox {
		padding-top: 40rpx;
		font-size: 34rpx;
		font-family: STSongti, STSongti-Bold;
		font-weight: 700;
		text-align: center;
		color: #202021;
		position: relative;
		padding-bottom: 20rpx;
		.back {
			position: absolute;
			left: 0;
			top: 40rpx;
			margin-left: 30rpx;
		}
	}
	.record{
		margin-left: 15px;
		margin-right: 15px;
		.copy{
			width:50%;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
		}
		border-bottom: 1px solid #2c2c2c;
	}
}
</style>


